package com.WJY.service;

import com.WJY.dao.DeptDao;
import com.WJY.pojo.Dept;

import java.util.List;

public class DeptServiceImpl implements DeptService {

    //service调Dao层
    private DeptDao deptDao;

    public void setDeptDao(DeptDao deptDao) {
        this.deptDao = deptDao;
    }

    @Override
    public List<Dept> queryAllDept() {
        return deptDao.queryAllDept();
    }

    @Override
    public Dept queryDeptById(int id) {
        return deptDao.queryDeptById(id);
    }

    @Override
    public int addDept(Dept dept) {
        return deptDao.addDept(dept);
    }

    @Override
    public int delDeptById(int id) {
        return deptDao.delDeptById(id);
    }

    @Override
    public int updateDept(Dept dept) {
        return deptDao.updateDept(dept);
    }


}
